package com.cn.wanxi.service;

import com.cn.wanxi.dao.NavDao;
import com.cn.wanxi.dao.ProductNavDao;
import com.cn.wanxi.model.NavModel;
import com.cn.wanxi.model.ProductNavModel;

public class ProductNavService {
    public ProductNavModel[] getProductNavModels() {
        ProductNavDao productNavDao = new ProductNavDao();
        int length = productNavDao.hrefs.length;
        ProductNavModel[] productNavModels = new ProductNavModel[length];
        for (int i = 0; i < length; i++) {
            ProductNavModel model = new ProductNavModel();
            model.setHref(productNavDao.hrefs[i]);
            model.setTitle(productNavDao.titles[i]);
            productNavModels[i] = model;
        }
        return productNavModels;
    }
}
